package com.ap.core.business.message.validation.handler;

import com.ap.core.business.message.domain.translators.BindingMetaData;
import com.ap.core.business.message.validation.listener.ValidationListener;
import com.ap.core.exception.BusinessFailureException;

/**
 * User: Ranjit.Singh
 * Validation Handler to validate <REQ> type object
 */
public interface ValidationHandler<REQ> {

    /**
     * Validate the request object
     * @param request - request object of type <REQ>
     * @param metaData - binding meta data required in validation process
     * @param validationListener - validation listener to give call back to message processor
     */
    void validate(REQ request, BindingMetaData metaData, ValidationListener validationListener) throws BusinessFailureException;
}
